package cn.stylefeng.guns.sys.modular.upload.mapper;

import cn.stylefeng.guns.sys.modular.upload.entity.FileTable;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UploadMapper extends BaseMapper<FileTable> {

    void insertFile(@Param("nowTime") String nowTime, @Param("uuid") String uuid, @Param("fileType") String fileType, @Param("s") String s, @Param("userId") String userId, @Param("remark") String remark, @Param("fileName") String fileName, @Param("messageId") String messageId);

    IPage<Map<String, Object>> selectByList(@Param("page") IPage<Map<String, Object>> page, @Param("messageId") String messageId);

    List<FileTable> list(Integer userId, Integer messageId);

}
